procedure PASCALMAIN; external name 'PASCALMAIN';

{******************************************************************************
                        Shared library start/halt
 ******************************************************************************}
{$asmmode ATT}

procedure KaffeOS_start; public name 'FPC_LIB_START';
begin
  IsLibrary:=true;

  PASCALMAIN;
end;

procedure _FPC_shared_lib_start(argc : dword;argv,envp : pointer); cdecl; public name '_FPC_SHARED_LIB_START_LOCAL'; public name '_start';
begin
  { we've to discuss about the use of this ;) }
  {asm
    movl    %esp,initialstkptr
  end;}

  IsLibrary:=true;

  PASCALMAIN;
end;
